from fastapi import APIRouter
from app.schemas.base import Success
from app.schemas.base import Custom
from pydantic import BaseModel


class XiaoDemoModel(BaseModel):
    name: str
    id: int


x_router = APIRouter()


@x_router.get("/x-hello", summary="x_ 测试 api demo")
async def x_hello():
    return Success()


@x_router.post("/x-post/", summary="x_ 测试提交")
async def _(data: XiaoDemoModel):
    return Success(data=f"data:{data}")
